import tkinter as tk
root = tk.Tk()
root.title("登录")
root.geometry("600x600")
root.resizable(False,False)
canvas = tk.Canvas(root,width=580,height=580,bg="yellow")
canvas.pack()
# 线条
canvas.create_line(0,0,100,100,fill="red",width=5)
# 圆形
canvas.create_oval(100,100,200,200,fill="blue",width=5)
# 矩形
canvas.create_rectangle(200,200,300,300,fill="red",width=5)
# 文本
canvas.create_text(300,300,text="Hello World",fill="black",font=("黑体",20))
# 图片
photo = tk.PhotoImage(file="1.png")
canvas.create_image(40,40,image=photo)


root.mainloop()